<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../react18/react.development.js"></script>
  <script src="../react18/react-dom.development.js"></script>
  <script src="../react18/babel.min.js"></script>
</head>
<style>
  .outer {
    width: 200px;
    height: 200px;
    background-color: aqua;
  }
</style>

<body>
  <div id="app"> </div>
  <script type="text/babel">
    /* 
      jsx语法2
        - 指定样式的类名不要用class，必须用className,指定for属性要用htmlFor(避免元素的自带属性和js的关键字冲突)
        - 在书写style行内样式的时候,style希望接受的是一个对象格式 所以案例写法:style={{color:"red"}}
        */
    /* const vDOM = (
      <div className="outer">
        <h1>JSX</h1>
        <p style={{color:"red",fontSize:"80px"}}>JSX贼方便</p>
        <p className="active" htmlFor="form">今天的天气真热啊</p>
      </div>
    ); 
     //创建容器并渲染虚拟DOM
    ReactDOM.createRoot(document.getElementById('app')).render(vDOM)*/


    /* const vDOM = (
      <div className = "outer">
        <h1>React</h1>
        <p style = {{color:"red",fontSize:"30px"}}>JSX贼方便</p>
        <p className = "active" htmlFor = "form">今天的天气真热啊</p>
      </div>
    )

    //创建容器并渲染虚拟DOM
    ReactDOM.createRoot(document.getElementById('app')).render(vDOM) */


    const vDom = (
      <div className = "outer">
        <h1 style = {{color:"red"}}>111</h1>
      </div>
    )

    ReactDOM.createRoot(document.getElementById('app')).render(vDom)


    
   
  </script>
</body>

</html>